#[test]
fn test_deref_raw_pointer() {
    let mut x = 5;
    let p = &mut x as *mut i32;//可变原始指针
    let p2 =&x as *const i32; //不可变原始指针
    unsafe{
        println!("{}", *p); //*p
        println!("{}", *p2);//*p2
    }
    unsafe {
        *p = 10;
        //*p2 = 20; //不可变原始指针不能修改
    }
    assert_eq!(x, 10);
    println!("{}", x);
    let address = 0x0123456usize;
    let r = address as *const i32;
    unsafe {
        println!("{}", *r);  //exit code: 0xc0000005, STATUS_ACCESS_VIOLATION
    }
}